package com.itheima.fanshe;

import java.lang.reflect.Method;

/*
使用一个未知类的内容

 */
public class Demo04 {
    public static void main(String[] args) throws Exception {
        Class<?> clazz = Class.forName("com.itheima.Haha");
        Method[] methods = clazz.getDeclaredMethods();
        for (Method method : methods) {
            method.invoke(clazz.newInstance());
        }


    }


}
